package com.minggo.charmword.activity;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Handler.Callback;
import android.os.Message;
import android.view.View;
import android.view.View.OnClickListener;

import com.baidu.mobstat.StatService;
import com.minggo.charmword.R;
import com.minggo.charmword.service.CharmWordApplication;

/**
 * 复习
 * 
 * @author minggo
 * @time 2014-9-2 S下午10:41:18
 */
public class LearnActivity extends Activity implements OnClickListener {

	private View backV;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_learn);
		initUI();
		CharmWordApplication.allActivities.add(this);
	}

	/**
	 * 请求数据
	 */
	private void requestData() {

	}

	/**
	 * 初始化UI
	 */
	private void initUI() {
		backV = findViewById(R.id.lo_learn_back);

		backV.setOnClickListener(this);
	}

	/**
	 * 刷新UI
	 */
	private void refreshUI() {

	}

	private Handler handler = new Handler(new Callback() {

		@Override
		public boolean handleMessage(Message msg) {
			switch (msg.what) {
			case 0:

				break;

			default:
				break;
			}
			return false;
		}
	});

	@Override
	public void onBackPressed() {
		super.onBackPressed();
		finish();
	}

	@Override
	protected void onResume() {
		super.onResume();
		StatService.onResume(this);
	}

	@Override
	protected void onPause() {
		super.onPause();
		StatService.onPause(this);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.lo_learn_back:
			onBackPressed();
			break;

		default:
			break;
		}

	}
}
